<html>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<body>
  <div>index</div>
  <div id="abc"></div>
  <div class="abc"></div>
  <div class="abc"></div>
  <div class="abc"></div>
  <div class="abc"></div>
  <div class="abc"></div>
</body>

<script>
  document.querySelector("#abc").innerHTML = '123'
  console.log(document.querySelector(".abc"));
</script>

</html>